package com.lanxin.jet.services;

import java.util.List;
import java.util.Map;

import com.lanxin.jet.beans.ResourceBean;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

public interface ResourceService {

    //标准CURD
    public String insert(String bid, String type, String path, long size);
    public int count(String bid, String keyword);
    public ResourceBean get(String id);
    public List<ResourceBean> getList(int offset, int limit, String bid, String keyword);
    public void update(ResourceBean resource);
    public void delete(String id);

    /**
     * 设置封面接口
     */
    public interface ImageOpt {

        /**
         * 设置封面
         * @param response
         * @param id        对应模块内容id
         * @param path      图片路径
         */
        @RequestMapping(value = "/setCover.do", method = RequestMethod.POST)
        public Map<String, Object> setCover(String id, String path);
    }
}